package com.onefish.toolkit.utils;

import com.alibaba.fastjson.annotation.JSONField;

import java.io.Serializable;

public class ReturnT<T> implements Serializable {
    public static final String SUCCESS_CODE = "200";
    public static final String ERROR_CODE = "500";
    private String code;

    private String msg;
    @JSONField()
    private T content;

    public ReturnT() {
    }

    public ReturnT(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public ReturnT(String code, String msg, T content) {
        this.code = code;
        this.msg = msg;
        this.content = content;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getContent() {
        return content;
    }

    public void setContent(T content) {
        this.content = content;
    }
}
